/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.appspot.trick.it.admin.task;

import com.appspot.trick.it.admin.api.GaeArticleAPIService;
import com.appspot.trick.it.admin.api.GaeParameterMstAPIService;
import com.appspot.trick.it.admin.controller.MainController;
import com.appspot.trick.it.admin.model.ParameterMstModel;
import javafx.concurrent.Service;
import javafx.concurrent.Task;

/**
 *
 * @author takahara
 */
public class ParameterMstGetTask extends Service<ParameterMstModel> {


    /**
     * コンストラクタ
     *
     */
    public void run() {
        this.restart();
    }

    @Override
    protected Task<ParameterMstModel> createTask() {
        return new Task<ParameterMstModel>() {

            @Override
            protected ParameterMstModel call() throws Exception {
                GaeParameterMstAPIService gaeService = new GaeParameterMstAPIService(MainController.getInstance().getSiteMstEntity());
                ParameterMstModel model = gaeService.get();

                return model;
            }
        };

    }

}
